﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace VirtualTournaments.Frontend.MenuControls.TournamentManagerMenu.InnerControls
{
    public partial class TournamentManagerMainMenu : System.Web.UI.UserControl
    {
        public EventHandler GoBackButtonClicked;
        public EventHandler GoToPlayMenuClicked;
        public EventHandler GoToCreateTournamentClicked;

        protected void CreateTournamentButton_OnClick(object sender, EventArgs e)
        {
            GoToCreateTournamentClicked(this, new VirtualTournamentsFrontendEvent());
        }
        protected void CreateTeamButton_OnClick(object sender, EventArgs e)
        {
            //TODO
        }
        protected void CreatePlayerButton_OnClick(object sender, EventArgs e)
        {
            //TODO
        }
        protected void PlayButton_OnClick(object sender, EventArgs e)
        {
            GoToPlayMenuClicked(this, new VirtualTournamentsFrontendEvent());
        }
        protected void ViewAllButton_OnClick(object sender, EventArgs e)
        {
            //TODO
        }

        protected void GoBackButton_OnClick(object sender, EventArgs e)
        {
            //TODO: find a better way to do this
            GoBackButtonClicked(this, new VirtualTournamentsFrontendEvent { SenderMenu = "TournamentManagerMainMenu" });
        }
    }
}